<template>
  <main class="wss-container">
    <ComTabs
      @EventSelectTab="currentSelect"
      :activeName="activeName"
      :tabList="tabList"
    ></ComTabs>
    <div class="main-div">
      <MyUser v-if="activeName == 'myUser'"></MyUser>
      <MyChannel v-else-if="activeName == 'myChannel'"></MyChannel>
    </div>
  </main>
</template>

<script>
import ComTabs from "@/wss/components/ComTabs.vue";
import MyUser from "./myUser/index.vue";
import MyChannel from "./myChannel/index.vue"

export default {
  components: { MyUser, MyChannel, ComTabs },
  data() {
    return {
      activeName: "myUser",
      // tab页数据
      tabList: [
        {
          label: "我的用户",
          name: "myUser",
        },
        {
          label: "我的渠道",
          name: "myChannel",
        },
      ],
      // 组织列表
      organizationList: [],
      // 组织id
      organizationId: "",
    };
  },
  async created() {

  },
  methods: {
    currentSelect({ label, index, name }) {
      // 表格切换重新
      this.activeName = name;
    },
  },
};
</script>

<style scoped>
.wss-container {
  display: flex;
  flex-direction: column;
  overflow: initial;
}
.wss-container .el-tabs {
  height: 40px;
  margin-bottom: 20px;
}
.wss-container .main-div {
  height: calc(100% - 60px);
}
</style>